namespace Scenic
{
namespace Renderer
{

class PlainPolygonRenderer : public PolygonRenderer
{
	Context *context;
	GLUtesselator *tessObj;
	TessVertexBuffer tessVertexBuffer;
	VertexStore *vs;
	int triangle[3];
	int triangleIndex;
public:
	PlainPolygonRenderer(Context *context);
	~PlainPolygonRenderer();

	void begin();
	void end();
	void beginContour();
	void endContour();
	void addPoint(double x, double y);

	void edgeFlag(bool edge);
	void combineFunc(double coords[3], struct TessVertex *d[4], 
		float w[4], struct TessVertex **dataOut);
	void vertexFunc(struct TessVertex *data);
private:
	void draw();
};

}
}
